﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Lib_frmParent
{
    public partial class frmDanhmuc : Form
    {
        public frmDanhmuc()
        {
            InitializeComponent();
        }

        private void frmDanhmuc_Load(object sender, EventArgs e)
        {
            ena_object(false);
        }

        private void butmoi_Click(object sender, EventArgs e)
        {
            ena_object(true);
        }

        private void butluu_Click(object sender, EventArgs e)
        {
            ena_object(false);
        }

        private void butsua_Click(object sender, EventArgs e)
        {
            ena_object(true);
        }

        private void butxoa_Click(object sender, EventArgs e)
        {

        }

        private void butboqua_Click(object sender, EventArgs e)
        {
            ena_object(false);
        }

        private void butketthuc_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        public void ena_object(bool value)
        {
            butmoi.Enabled = !value;
            butluu.Enabled = value;
            butsua.Enabled = !value;
            butboqua.Enabled = value;
            butxoa.Enabled = !value;
            butketthuc.Enabled = !value;
            dvgDanhmuc.Enabled = !value;
        }
    }
}
